package jp.ircbot.kaitvip.common;

import java.io.IOException;

import org.jibble.pircbot.IrcException;
import org.jibble.pircbot.NickAlreadyInUseException;

public class SatoBotMain {

	/**
	 * メインメソッド
	 * 
	 * @param args
	 */
	public static void main(String[] args) {

		try {
			conectBot();
		} catch (Exception e) {
			System.out.println(e);

		}

	}

	/**
	 * ログイン
	 * 
	 * @throws NickAlreadyInUseException
	 * @throws IOException
	 * @throws IrcException
	 */
	private static void conectBot() throws NickAlreadyInUseException, IOException, IrcException {
		// Now start our bot up.
		MyBot bot = new MyBot("Sato_bot");

		// Enable debugging output.
		bot.setVerbose(true);
		bot.setAutoNickChange(true);

		// 文字コード
		bot.setEncoding("ISO2022JP");

		// Connect to the IRC server.
		bot.connect("irc.friend-chat.jp");

		// Join channel.
		bot.joinChannel("#bot_test");
		// bot.joinChannel("#kai_vip");
		// bot.joinChannel("#kai_test");

	}

}
